/**
 * 
 */
package jface.viewers;

import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;

import data.model.Developer;

/**

 * 
 */
public class DeveloperProcessesFilter extends ViewerFilter {
	private Developer developer;

	public DeveloperProcessesFilter(Developer developer) {
		this.developer = developer;
	}

	public void setDeveloper(Developer developer) {
		this.developer = developer;
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers
	 * .Viewer, java.lang.Object, java.lang.Object)
	 */
	@Override
	public boolean select(Viewer viewer, Object parentElement, Object element) {
		data.model.Process process = (data.model.Process) element;
		return process.getDeveloper().equals(developer);
	}

}
